<template>
	<tm-app ref="app">
		<!--<tm-navbar title="榜样的力量" color="orange" hideBack="true" hideHome="true"></tm-navbar>-->
		<tm-navbar title="榜样的力量" color="orange" linear="right" linearDeep="accent"></tm-navbar>
		<view class="pa-32">
			<tm-html :content="contnt"></tm-html>
		</view>
		
		
		<view class="mb-32 mx-32 round-3 overflow">
			<tm-cell :margin="[0, 0]" :titleFontSize="30" title=" ">
				<template v-slot:right><tm-text label=" "></tm-text></template>
			</tm-cell>
			<tm-cell :margin="[0, 0]" :titleFontSize="30" title=" ">
				<template v-slot:right><tm-text label=" "></tm-text></template>
			</tm-cell>
			<tm-cell :margin="[0, 0]" :titleFontSize="30" title=" ">
				<template v-slot:right><tm-text label=" "></tm-text></template>
			</tm-cell>
		</view>
		
		
		<tm-tabbar :autoSelect="false" v-model:active="acc">
			<tm-tabbar-item @click="acc=0" activeColor="orange" url='/pages/index/index' open-type='reLaunch' text="首页"
				icon='tmicon-md-home'></tm-tabbar-item>
			<tm-tabbar-item @click="acc=1" activeColor="orange" url='/pages/index/seach' text="预约"
				icon='tmicon-ios-bookmarks'></tm-tabbar-item>
			<tm-tabbar-item @click="acc=2" activeColor="orange" url='/pages/index/order' text="订单"
				unicon="tmicon-ios-filing" icon="tmicon-ios-filing"></tm-tabbar-item>
			<tm-tabbar-item @click="acc=3" activeColor="orange" url='/pages/index/my' text="我" unicon="tmicon-account"
				icon="tmicon-userplus-fill"></tm-tabbar-item>
		</tm-tabbar>
	</tm-app>
</template>

<script lang="ts" setup>
	import { ref } from "vue"
	import { onLoad } from "@dcloudio/uni-app"
	import { readNews } from "@/api/news"

	const contnt = ref("");
	const id = ref("");
	onLoad((e) => {
		// console.log(e.id);// 0:帮手；1:家长
		id.value = e.id
		loadNewDetail();
	})
	
	const loadNewDetail = async() => {
		let param = {"id":id.value};
		const result = await readNews(param);
		contnt.value = result.content;
	}
</script>